var app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    signList: []
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.getSignList()
  },

  getSignList: function () {
    wx.showLoading({
      title: '加载中',
    })
    var that = this
    wx.request({
      url: app.host + '/sign/common',
      header: {
        accessToken: app.accessToken
      },
      method: "get",
      complete: function (res) {
        wx.hideLoading()
        console.log(res)
        if (res.statusCode == 200) {
          if (res.data.code == 0) {
            that.setData({
              signList: res.data.data
            })
          }
        }
      }
    })
  },
  toQrcode: function (res) {
    console.log(res)
    var signId = res.currentTarget.dataset.id
    wx.navigateTo({
      url: '/pages/admin/sign/qrcode/qrcode?signId=' + signId,
    })
  },
  toSignLogList: function (res) {
    console.log(res)
    var signId = res.currentTarget.dataset.id
    wx.navigateTo({
      url: '/pages/admin/sign-log/list/list?signId=' + signId,
    })
  }


})